package com.lyandwc.lw_bbs.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyandwc.lw_bbs.entity.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommentDao extends BaseMapper<Comment> {
    Comment findAbbrCommentById(int id);

    Comment findCommentById(int id);

    List<Comment> listCommentsByTopicId(
            @Param("topicId") int topicId,
            @Param("startIndex") int startIndex,
            @Param("limit") int limit
    );

    List<Comment> listReplyCommentsById(int id);
}
